package com.tenebrous.jestic.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description:
 * @Project: jestic-server
 * @Package: com.tenebrous.jestic.utils
 * @Author: zhangya
 * @CreateTime: 2023-06-03  22:40
 * @Version: 1.0.0
 */
public class InstanceUtils {

    /**
     * @description:
     * 创建实例id
     *
     * @author: zhangya
     * @date: 2023/6/3 22:41
     * @param:
     * @return:
     **/
    public static String createInstanceId() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String format = sdf.format(new Date()).toString();
        int random = (int) ((Math.random() * 9 + 1) * 1000000);
        return format + random;
    }
}
